package com.java.base.exercise.designmode.proxy;

import com.java.base.exercise.designmode.proxy.jdkproxy.dao.SmsService;
import com.java.base.exercise.designmode.proxy.jdkproxy.SmsServiceIml;
import com.java.base.exercise.designmode.proxy.jdkproxy.proxyimpl.JDkProxyFactory;

/**
 * @Author RenPu
 * @Date 2022/6/20 14:55
 * @Version 1.0
 * @Description: JDK动态代理测试类
 **/
public class JDKProxyTest {

    public static void main(String[] args) {
        SmsService smsService = (SmsService) JDkProxyFactory.getProxyObject(new SmsServiceIml());
        String send = smsService.send("您的花费，已欠费请立即充值，避免影响您的使用");
        System.out.println(send);
    }
}
